// import { createElement } from 'react'
import { createElement, render, renderDOM } from './element'

// 跳过JSX -> 编译过程
{/* <ul className="list">
  <li className="item">周杰伦</li>
  <li className="item">王俊杰</li>
  <li className="item">王力宏</li>
</ul> */}
let virtualDOM = createElement('ul', {class: 'list'}, [
  createElement('li', {class: 'item'}, ['周杰伦']),
  createElement('li', {class: 'item'}, ['王俊杰']),
  createElement('li', {class: 'item'}, ['王力宏']),
])

console.log(virtualDOM)
let el = render(virtualDOM); // 渲染 内存中 document.createElement(tag)
console.log(el)
// Element树  -> Tag树
renderDOM(el, document.getElementById('root'))

const App = () => {
  return (
    <div>app</div>
  )
}
export default App